﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="d" uri="/WEB-INF/resource.tld" %>
<d:resource root="${ctx.resource}/build" type="script" src="js/config.js">
  <script src="${ctx.resource}/js/vendor/require.js"></script>
  <script>
    require.config({
      urlArgs: "bust=v2.6.4",
      baseUrl: '${ctx.resource}/js',
      paths: {
        'zepto': 'vendor/zepto',
        'sui': 'vendor/sm',
        'smExtend': 'vendor/sm-extend',
        'underscore': 'vendor/underscore',
        'handlebars': 'vendor/handlebars.amd',
        'html2Canvas': 'vendor/html2canvas',
        'JST': 'template/JST',
        'text': 'vendor/text',
        'wx': 'http://res.wx.qq.com/open/js/jweixin-1.0.0',
        'wxshare': 'wxshare',
        'amountControl': 'component/amount-control',
        'countDown': 'component/countdown',
        'labelSelect': 'component/label-select',
        'submitForm': 'component/submitform',
        'cityPicker': 'component/city-picker',
        'chart': 'component/chart.min',
        'modernizrCustom': 'component/modernizr.custom',
        'pagetransitions': 'component/pagetransitions',
      },
      shim: {
        'zepto': { exports: '$'},
        'sui': { deps: ['zepto'] },
        'smExtend': { deps: ['zepto','sui'] },
        'cityPicker': { deps: ['zepto', 'sui'] },
        'amountControl': {deps: ['zepto']},
        'countDown': {deps: ['zepto']},
        'labelSelect': {deps: ['zepto']},
        'submitForm': {deps: ['zepto']},
        'chart': {deps: ['zepto']},
        'pagetransitions': { deps: ['zepto']}
      },
      deps: ['zepto', 'sui'],
      callback: function($) {
        $.init()
      }
    })
  </script>
</d:resource>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-101357453-3', 'auto');
  ga('send', 'pageview');

</script>
<script type="text/javascript">
  (function(w) {
    w.__CTX__ = {
      root: '${ctx.host}',
      domain: '${ctx.systemHost}',
      resource: '${ctx.resource}',
      cdn: '${cloud.prod}'
    }
  })(window)
</script>
